package com.ruoyi.system.fastgpt.vo;

import java.util.List;
import java.util.Map;

public class FastGptRequest {
    private String model; // 使用的模型ID
    private List<ChatMessage> messages;
    private String chatId; // 可选，继续现有会话
    private Boolean stream;
    private Double temperature;
    private Map<String, Object> parameters; // 其他参数
    private Map<String, Object> variables; // 全局变量参数

    public FastGptRequest() {
    }

    public FastGptRequest(Map<String, Object> variables, Map<String, Object> parameters, Double temperature, Boolean stream, String chatId, List<ChatMessage> messages, String model) {
        this.variables = variables;
        this.parameters = parameters;
        this.temperature = temperature;
        this.stream = stream;
        this.chatId = chatId;
        this.messages = messages;
        this.model = model;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public List<ChatMessage> getMessages() {
        return messages;
    }

    public void setMessages(List<ChatMessage> messages) {
        this.messages = messages;
    }

    public String getChatId() {
        return chatId;
    }

    public void setChatId(String chatId) {
        this.chatId = chatId;
    }

    public Boolean getStream() {
        return stream;
    }

    public void setStream(Boolean stream) {
        this.stream = stream;
    }

    public Double getTemperature() {
        return temperature;
    }

    public void setTemperature(Double temperature) {
        this.temperature = temperature;
    }

    public Map<String, Object> getParameters() {
        return parameters;
    }

    public void setParameters(Map<String, Object> parameters) {
        this.parameters = parameters;
    }

    public Map<String, Object> getVariables() {
        return variables;
    }

    public void setVariables(Map<String, Object> variables) {
        this.variables = variables;
    }

    public static class ChatMessage {
        private String role;  // "system", "user" or "assistant"
        private String content;

        public ChatMessage() {
        }

        public ChatMessage(String role, String content) {
            this.role = role;
            this.content = content;
        }

        public String getRole() {
            return role;
        }

        public void setRole(String role) {
            this.role = role;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }
    }
}
